  //index.js
//获取应用实例
var app = getApp()
Page({
  data: {
    calendarData: [{"year":"2016","months":[{"month":9,"dates":[{"date":"12", "activity":["迅即佛山", "搜集"]},{"date":"14", "activity":["迅即佛山", "搜集", "搜集"]}]},{"month":10,"dates":[{"date":"4", "activity":["迅即佛山", "搜集"]},{"date":"12", "activity":["迅即佛山", "搜集"]}]}]},
{"year":"2017","months":[{"month":1,"dates":[{"date":"14", "activity":["迅即佛山", "搜集", "搜集"]},{"date":"18", "activity":["迅即佛山", "搜集"]}]},{"month":1,"dates":[{"date":"4", "activity":["迅即佛山", "搜集"]},{"date":"12", "activity":["迅即佛山", "搜集", "搜集", "搜集"]}]}]}],
    userInfo: {},
    component: {
      coupon: {
        title: '我的优惠券',
        subtitle: '8张优惠券',
        icon: 'arrow.png'
      }
    }
  },
  onLoad: function () {
    console.log('这是个人中心')
    var that = this
    //调用应用实例的方法获取全局数据
    app.getUserInfo(function(userInfo){
      //更新数据
      that.setData({
        userInfo:userInfo
      })
    })
  }
})
